package chaoyue.study.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 浏览器访问 http://localhost:8080/swagger-ui/index.html 即可看到接口文档
 */
@Tag(name = "测试", description = "测试Swagger的使用")
@RestController
@RequestMapping("hello")
public class HelloController {

    @Operation(summary = "hello方法", description = "hello方法的使用")
    @GetMapping
    public String hello(@Parameter(description = "部门ID") String name) {
        return "hello " + name;
    }
}
